<template>
  <div class="mb-4">
    <el-button>Default</el-button>
    <el-button type="primary">Primary</el-button>
    <el-button type="success">Success</el-button>
    <el-button type="info">Info</el-button>
    <el-button type="warning">Warning</el-button>
    <el-button type="danger">Danger</el-button>
  </div>

  <div class="mb-4">
    <el-button plain>Plain</el-button>
    <el-button type="primary" plain>Primary</el-button>
    <el-button type="success" plain>Success</el-button>
    <el-button type="info" plain>Info</el-button>
    <el-button type="warning" plain>Warning</el-button>
    <el-button type="danger" plain>Danger</el-button>
  </div>

  <div class="mb-4">
    <el-button round>Round</el-button>
    <el-button type="primary" round>Primary</el-button>
    <el-button type="success" round>Success</el-button>
    <el-button type="info" round>Info</el-button>
    <el-button type="warning" round>Warning</el-button>
    <el-button type="danger" round>Danger</el-button>
  </div>

  <div>
    <el-button :icon="Search" circle />
    <el-button type="primary" :icon="Edit" circle />
    <el-button type="success" :icon="Check" circle />
    <el-button type="info" :icon="Message" circle />
    <el-button type="warning" :icon="Star" circle />
    <el-button type="danger" :icon="Delete" circle />
  </div>
  <p>使用图标</p>
  <p>
    with extra class <b>is-loading</b>, your icon is able to rotate 360 deg in 2
    seconds, you can also override this
  </p>
  <el-icon :size="20">
    <Edit />
  </el-icon>
  <el-icon color="#409efc" class="no-inherit">
    <Share />
  </el-icon>
  <el-icon>
    <Delete />
  </el-icon>
  <el-icon class="is-loading">
    <Loading />
  </el-icon>
  <el-button type="primary">
    <el-icon style="vertical-align: middle">
      <Search />
    </el-icon>
    <span style="vertical-align: middle"> Search </span>
  </el-button>
  <div class="color-content bg-purple-50">
    <p>我是颜色变化</p>
    <div>
      <span class="span-one">one</span>
    </div>
    <div>
      <span class="span-two">two</span>
    </div>
  </div>
  <div class="text-bg-color">测试颜色</div>
  <div>
    <span>一个refresh svg </span>
    <svg-icon icon-class="userNum" />
  </div>
  <div>使用vm vh 去显示</div>
  <div class="box">我是box,使用vm，vh 来显示</div>
</template>

<script lang="ts" setup>
import {
  Check,
  Delete,
  Edit,
  Message,
  Search,
  Star,
} from "@element-plus/icons-vue";
import { useSettingsStore } from "@/store";
const settingsStore = useSettingsStore();
console.log("settingsStore title", settingsStore.title);
</script>
<style scoped lang="scss">
.color-content {
  color: var(--color-primary);

  .span-one {
    display: block;
    color: #fff;
    background-color: blue;
  }

  .span-two {
    display: block;
    color: #fff;
    background: pink;
  }
}

.text-bg-color {
  background-color: var(--text-bg-color);
}

/*
 直接使用 vw 和 vh 函数，将像素值传进去，得到的就是具体的 vw vh单位
 */
.box {
  width: vw(300);
  height: vh(100);
  margin-top: vh(10);
  margin-left: vw(10);
  font-size: vh(16);
  background-color: yellow;
  border: vh(20) solid var(--color-primary);
}
</style>
